GXCopyToColorProfile
You can use theGXCopyToColorProfile
function to copy the contents of an existing color profile object into another or to create a new color profile object and copy the contents of an existing color profile into it.
gxColorProfile GXCopyToColorProfile(gxColorProfile target, gxColorProfile source);
target
- A reference to the color profile to copy the source contents into. If you specify
nil
for this parameter, theGXCopyToColorProfile
function creates a new color profile.source
- A reference to the color profile object whose contents you want to copy.
- function result
- A reference to the color profile copy.
DESCRIPTION
The GXCopyToColorProfile function either copies the contents of an existing color profile object to another or creates a new color profile object and copies the contents of an existing color profile object to it. The function copies the profile data and tag list (but not the owner count) of the color profile specified by thesource
parameter into the color profile specified by thetarget
parameter. It clones, but does not copy, the tag objects in the tag list.If you specify
nil
for thetarget
parameter,GXCopyToColorProfile
creates a new color profile object and copies the source properties, including the owner count and tag list, into it.You can use the GXCopyToColorProfile function to create a copy of a color profile and then modify it without changing the original.
SPECIAL CONSIDERATIONS
If you specifynil
for thetarget
parameter and no error occurs, theGXCopyToColorProfile
function creates a color profile object; you are responsible
for disposing of that object when you no longer need it.If you specify a color profile object used by an onscreen view device as the target, this function posts a colorProfile_access_restricted warning.
ERRORS, WARNINGS, AND NOTICES
Errors out_of_memory colorProfile_is_nil Warnings colorProfile_access_restricted (debugging version) SEE ALSO
To create a new color profile that is not a copy of an existing color profile, use theGXNewColorProfile
function, described on page 4-79.To compare two color profile objects, use the GXEqualColorProfile function, described next.